const mongoose = require('mongoose')
const Schema = mongoose.Schema

// 实例化模板
const UserSchema = new Schema({
  id: {
    type: String,
    require: true
  },
  name: {
    type: String,
    require: true
  },
  phone: {
    type: String
    // require: true
  },
  avatar: {
    type: String
  },
  printNumber: {
    type: String,
    default: 0
  },
  date: {
    type: Date,
    default: Date.now()
  }
})

module.exports = mongoose.model('users', UserSchema)
